<template>
    <div>
    <square-button icon="el-icon-document-copy" :title="title" v-on="$listeners" v-bind="$attrs"
                   @click="showDialog"></square-button>
    <add-notes-dialog :visible.sync="visible" v-if="visible" :id="row.id"></add-notes-dialog>
    </div>
</template>
<script>
    import SquareButton from "@/components/WorkFlowsDialog/Case/SquareButton";
    import AddNotesDialog from "@/views/officialDocument/components/AddNotesDialog";

    export default {
        name: "NotesButton",
        components: {AddNotesDialog, SquareButton},
        props: {
            row: {
                type: Object,
                default: function () {
                    return {}
                }
            },
            title: {
                type: String,
                default: "添加小纸条"
            }
        },
        data() {
            return {
                visible:false
            }
        },
        computed: {},
        created() {
        },
        methods: {
            showDialog() {
                this.visible=true
            },
        }
    }
</script>
